|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--com.caucho.vfs.StreamImpl
|
+--com.caucho.vfs.FileReadStream
Stream encapsulating FileInputStream
| Fields inherited from class com.caucho.vfs.StreamImpl |
nullPath, path |
| Constructor Summary | |
FileReadStream()
Create a new FileReadStream. |
|
FileReadStream(java.io.FileInputStream is)
Create a new FileReadStream based on the java.io.* stream. |
|
FileReadStream(java.io.FileInputStream is,
Path path)
Create a new FileReadStream based on the java.io.* stream. |
|
| Method Summary | |
boolean |
canRead()
Returns true if there's an associated file. |
boolean |
canSkip()
Returns true if there's an associated file. |
void |
close()
Closes the underlying stream. |
int |
getAvailable()
Returns the number of bytes available for reading. |
void |
init(java.io.FileInputStream is)
Initializes a VfsStream with an input/output stream pair. |
int |
read(byte[] buf,
int offset,
int length)
Reads bytes from the file. |
long |
skip(long n)
Skips bytes in the file. |
| Methods inherited from class com.caucho.vfs.StreamImpl |
canWrite, clearWrite, flush, getAttribute, getAttributeNames, getFlushOnNewline, getNewline, getPath, getReadPosition, hasSkip, removeAttribute, setAttribute, setPath, write |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public FileReadStream()
public FileReadStream(java.io.FileInputStream is)
is - the underlying input stream.
public FileReadStream(java.io.FileInputStream is,
Path path)
is - the underlying input stream.path - the associated Path.| Method Detail |
public void init(java.io.FileInputStream is)
is - the underlying InputStream.os - the underlying OutputStream.public boolean canSkip()
public long skip(long n)
throws java.io.IOException
skip in class StreamImpln - the number of bytes to skippublic boolean canRead()
canRead in class StreamImpl
public int read(byte[] buf,
int offset,
int length)
throws java.io.IOException
read in class StreamImplbuf - a byte array receiving the data.offset - starting index to receive data.length - number of bytes to read.
public int getAvailable()
throws java.io.IOException
getAvailable in class StreamImpl
public void close()
throws java.io.IOException
close in class StreamImpl
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||